﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Manager2070.Library
{
    public partial class frmPatchApply : Form
    {
        private Patcher _owner;
        
        public frmPatchApply(Patcher owner)
        {
            InitializeComponent();

            _owner = owner;
        }

        public void DisableScreen()
        {
            //this.Invoke((MethodInvoker)delegate()
            //{
                btnApply.Enabled = false;
            //});
        }

        public void SetStatus(string status)
        {
            //this.Invoke((MethodInvoker)delegate()
            //{
                lblStatus.Text = status;
                lblStatus.Update();
            //});
        }

        private void frmPatchApply_Load(object sender, EventArgs e)
        {
            Game g = new Game();
            txtDestinationRda.Text = g.GetNewestPatchPath();
        }

        private void btnApply_Click(object sender, EventArgs e)
        {
            _owner.ApplyPatch(txtModSourceFile.Text);
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            _owner.Quit();
        }
    }
}
